import { request } from "../request";



/**
 * 删除AI资源接口返回结构
 */
export interface DeleteResourceRes {
    code: number;
    message: string;
    data: string;
    timestamp: Record<string, unknown>;
}

/**
 * 删除AI资源
 * @param id 资源ID
 * @returns 删除结果
 */
export const deleteAIResourceAPI = async (id: number): Promise<DeleteResourceRes> => {
    const token = localStorage.getItem("token");
    return request(`/api/ai-resources/${id}`, {
        method: "delete",
        headers: {
            Authorization: `Bearer ${token}`
        }
    });
};